﻿using System;

namespace TidyBlog.Data
{
    /// <summary>
    /// DELETE命令生成类
    /// </summary>
    public class DeleteCommand : Command
    {
        public DeleteCommand(string table)
            : base(table)
        {

        }

        public DeleteCommand(string[] tables)
            : base(tables)
        {

        }

        /// <summary>
        /// 生成SQL命令字符串
        /// </summary>
        /// <returns>SQL命令字符串</returns>
        public override string ToString()
        {
            return String.Format(DbHelper.Provider.GetCmdTemplate("DELETE"), GetTableString(), GetWhereString());
        }
    }
}